package org.cwnuit.train.utils;

import java.util.Calendar;

public class Today {

	private Calendar NOW = Calendar.getInstance();

	private int YEAR = NOW.get(Calendar.YEAR);

	private int MONTH = NOW.get(Calendar.MONTH) + 1;

	private int DAY = NOW.get(Calendar.DAY_OF_MONTH);

	private int WEEK = NOW.get(Calendar.DAY_OF_WEEK);

	private int HOUR = NOW.get(Calendar.HOUR_OF_DAY);

	private int MINUTE = NOW.get(Calendar.MINUTE);

	private int SECOND = NOW.get(Calendar.SECOND);

	//
	public String getDate() {
		return YEAR + "-" + MONTH + "-" + DAY;
	}

	public String getDateOfNum() {
		String y = YEAR + "-";
		String m = MONTH + "-";
		String d = DAY + "";
		if (MONTH < 10)
			m = "0" + m;
		if (DAY < 10)
			d = "0" + d;
		return y + m + d;
	}

	public String getAllDateOfNum() {
		String y = YEAR + "";
		String m = MONTH + "";
		String d = DAY + "";
		String h = HOUR + "";
		String mi = MINUTE + "";
		String s = SECOND + "";
		if (MONTH < 10)
			m = "0" + MONTH;
		if (DAY < 10)
			d = "0" + DAY;
		if (HOUR < 10)
			h = "0" + HOUR;
		if (MINUTE < 10)
			mi = "0" + MINUTE;
		if (SECOND < 10)
			s = "0" + SECOND;
		return y + "-" + m + "-" + d + " " + h + ":" + mi + ":" + s;
	}

	public String getDateOfAll() {
		String y = YEAR + "";
		String m = MONTH + "";
		String d = DAY + "";
		if (MONTH < 10)
			m = "0" + m;
		if (DAY < 10)
			d = "0" + d;
		return y + m + d + HOUR + MINUTE + SECOND;

	}

	// �����ݺ��ϸ��µ��·�
	public String getDateOfLastMonth() {
		String y = YEAR + "-";
		String m = MONTH + "";
		if (MONTH < 10)
			m = "0" + m;
		return y + m;
	}

	// �����ݺ��ϸ��µ��·ݵ��ַ�
	public String getDateOfLastYearMonth() {
		String y = YEAR + "��";
		String m = MONTH + "��";
		if (MONTH < 10)
			m = "0" + m;
		return y + m;
	}

	public String getDateOfShow() {
		return YEAR + "��" + MONTH + "��" + DAY + "��";
	}

	public String getDayOfWeek() {
		String dayOfWeek = "";
		switch (WEEK) {
		case 1:
			dayOfWeek = "������";
			break;
		case 2:
			dayOfWeek = "����һ";
			break;
		case 3:
			dayOfWeek = "���ڶ�";
			break;
		case 4:
			dayOfWeek = "������";
			break;
		case 5:
			dayOfWeek = "������";
			break;
		case 6:
			dayOfWeek = "������";
		case 7:
			dayOfWeek = "������";
			break;
		}
		return dayOfWeek;
	}

	public String getTime() {
		return HOUR + ":" + MINUTE + ":" + SECOND;
	}

	public int getYEAR() {
		return YEAR;
	}

	public int getDAY() {
		return DAY;
	}

	public int getMONTH() {
		return MONTH;
	}
}
